#include "flower.h"
#include <stdio.h>

int 
get_flower_number(const struct flower *const f)
{
    return (f->number);
}

const char *
get_flower_name(const struct flower *const f)
{
    return (f->name);
}

int 
get_flower_amount(const struct flower *const f)
{
    return (f->amount);
}

float 
get_flower_price(const struct flower *const f)
{
    return (f->price);
}

int 
get_flower_category(const struct flower *const f)
{
    return (f->category);
}

const char *
get_flower_imageurl(const struct flower *const f)
{
    return (f->imageurl);
}

const char *
get_flower_intro(const struct flower *const f)
{
    return (f->intro);
}

void 
set_flower_number(struct flower *f, int number)
{
    f->number = number;
}

void 
set_flower_name(struct flower *f, char *name)
{
    snprintf(f->name, sizeof(f->name), "%s", name);
}

void 
set_flower_amount(struct flower *f, int amount)
{
    f->amount = amount;
}

void 
set_flower_price(struct flower *f, float price)
{
    f->price = price;
}

void 
set_flower_category(struct flower *f, int category)
{
    f->category = category;
}

void 
set_flower_imageurl(struct flower *f, char *imageurl)
{
    snprintf(f->imageurl, sizeof(f->imageurl), "%s", imageurl);
}

void 
set_flower_intro(struct flower *f, char *intro)
{
    snprintf(f->intro, sizeof(f->intro), "%s", intro);
}

